package com.dzl.util.wx.constant;

/**
 * 微信常量类
 * @author lishunxing
 */
public class WxConstant {

    // 获取access_token的接口地址（GET） 限2000（次/天）
    public final static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=SECRET";
    //前端获取用户code请求地址
    public final static String AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=URL&response_type=code&scope=snsapi_userinfo#wechat_redirect";
    // 获取微信网页授权openId的接口地址
    public final static String OAUTH_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
    // 获取小程序openId的接口地址
    public final static String XCX_OAUTH_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
    // 获取网页授权微信用户信息地址
    public final static String SNS_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
    // 微信卡券商户创建接口地址
    public final static String API_TICKET_SUB_MERCHANT_CREATE_URL = "https://api.weixin.qq.com/card/submerchant/submit?access_token=TOKEN";
    // 微信卡券创建接口地址
    public final static String API_TICKET_CREATE_URL = "https://api.weixin.qq.com/card/create?access_token=TOKEN";
    // 微信卡券类目查询接口地址
    public final static String API_TICKET_CATEGORY_URL = "https://api.weixin.qq.com/card/getapplyprotocol?access_token=TOKEN";
    //上传临时图片到微信平台
    public static final String API_TICKET_UPLOAD_IMG_URL="https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token=TOKEN&type=TYPE";
    //上传临时素材到微信平台
    public static final String API_TICKET_UPLOAD_FILE_URL="https://api.weixin.qq.com/cgi-bin/media/upload?access_token=TOKEN&type=TYPE";
    //更新会员卡
    public static final String UPDATE_MEMBERCARD_URL = "https://api.weixin.qq.com/card/update?access_token=TOKEN";
    //更新会员卡用户动账信息
    public static final String UPDATE_MEMBERCARD_USER = "https://api.weixin.qq.com/card/membercard/updateuser?access_token=TOKEN";
    //删除卡券接口
    public static final String DELETE_MEMBER_CARD_URL = "https://api.weixin.qq.com/card/delete?access_token=TOKEN";
    //设置卡券失效接口
    public static final String UNAVAILABLE_MEMBER_CARD_URL = "https://api.weixin.qq.com/card/code/unavailable?access_token=TOKEN";
    //查看卡券详情接口
    public static final String GET_DETAIL_MEMBER_CARD_URL="https://api.weixin.qq.com/card/get?access_token=TOKEN";
    //创建投放二维码接口
    public static final String  CREATE_QRCODE_MEMCARD_URL = "https://api.weixin.qq.com/card/qrcode/create?access_token=TOKEN" ;
    //显示二维码图片接口
    public static final String SHOW_QRCODE_MEMCARD_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=";
    //JSSDK卡券使用签名
    public static final String GET_JS_TICKET_SINGNATURE_URL ="https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=TOKEN&type=jsapi";
    //JSSDK卡券排序地址
    public static final String GET_JS_TICKET_SINGNATURE_STR ="jsapi_ticket=TICKET&noncestr=STR&timestamp=TIME&url=URL";
    //JSSDK卡券投放签名
    public static final String GET_APP_TICKET_SINGNATURE_URL ="https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=TOKEN&type=wx_card";
    //解码加密Code
    public static final String CARD_CODE_DECRYPT = "https://api.weixin.qq.com/card/code/decrypt?access_token=TOKEN";
    //微信小程序订阅消息推送接口
    public static final String XCX_TEMPLATE_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=TOKEN";
    //获取微信小程序获取小程序码
    public static final String GET_WX_XXC_CODE_UNLIMIT = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=TOKEN";
    //获取微信小程序获取普通程序码
    public static final String CREATE_WX_XXC_QRCODET = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=TOKEN";
    //微信公众号模板消息通知
    public static final String TEMPLATE_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
    //获取微信公众号二维码
    public static final String GET_WX_APP_CODE_UNLIMIT = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=TOKEN";

    /** 以下为微信推送事件常量 **/

    //卡券审核通过
    public static final String CARD_PASS_CHECK = "card_pass_check";
    //卡券审核不通过
    public static final String CARD_NOT_PASS_CHECK = "card_not_pass_check";
    //子商户审核事件
    public static final String CARD_MERCHANT_CHECK_RESULT = "card_merchant_check_result";
    //用户领取卡券
    public static final String USER_GET_CARD = "user_get_card";
    //用户删除卡券通知
    public static final String USER_DEL_CARD = "user_del_card";

    /** 以下为微信登录类型 **/
    public static final int XCX_LOGIN_TYPE = 1;// 小程序登录

    public static final int PUBLIC_LOGIN_TYPE = 2;//公众号登录

    public static final int UNION_LOGIN_TYPE = 3;//UNION_ID登录

    public static final int XCX_NOT_REGISTER_ID = -404; // 小程序授权登录但未注册用户临时赋予ID


    //Saas小程序appid
    public static final String SAAS_APPID = "wx956b295d5a91cb40";
    //Saas小程序appsceret
    public static final String SAAS_APPSCERET = "c7e98f15fbd1bd87e9987358f75f4b45";

}
